<?php if (!empty($user->id)): ?>
<section id="content">
  <div class="block">
    <header>      
      <h2>Upravit profil &mdash; <?php echo $user->firstname.' '.$user->lastname; ?></h2>
    </header>
    <section class="block-body">
      <div id="big">
      <form action="<?php echo url::base(); ?>files/avatar/<?php echo $user->id ?>" enctype="multipart/form-data" method="post">
        <fieldset>
          <ul>
            <li style="min-height:28px">
              <label>Avatar:</label>
            </li>
            <li>
              <div class="text">
                <input type="text" id="file-name" class="transp" readonly="readonly">
                <input type="button" value="Vybrat soubor" class="file-input-button" />
                <input type="file" name="filedata" class="file-input-hidden" onchange="javascript: document.getElementById('file-name').value = this.value" />
              </div>
            </li>
            <li>
            <input type="submit" value="Uložit avatar"  />
            </li>
          </ul>
        </fieldset>
      </form>
      <form action="<?php echo url::base(); ?>profile/edit/<?php echo $user->id ?>" method="post">
        <fieldset>
          <ul>
            <li>
              <label for="description">Profilový text:</label>
              <textarea cols="10" rows="10" name="description" id="description" class="text" ><?php echo $user->text ?></textarea>
            </li>
            <li>
            <input type="submit" value="Uložit text"  />
            </li>
          </ul>
        </fieldset>
      </form>
      </div>
    </section>
  </div>
  <div class="block-bottom"></div>
</section>
<?php endif ?>

